package designModel.observer;

/**
 * 学生,实现观察者,观察老师布置作业的动作
 */
public class Student implements Observer {
    private String name;

    public Student(String name) {
        this.name = name;
    }

    @Override
    public void update(String msg) {
        System.out.println(name + "收到作业:" + msg);
    }
}
